<?php
include './_logger.php';
session_start();

if (isset($_SESSION["username"])) {
    $username = $_SESSION["username"];
    $logoutMessage = "";
    if (isset($_GET["logoutMessage"])) {
        $logoutMessage = urldecode($_GET["logoutMessage"]);
    }
    writeLog("$username logout $logoutMessage");
}

session_destroy();
header('Location: my-places.php');
?>